/*
 * Created by 2006-3-28 22:28:19
 * $Id: BaseModel.java 76 2006-07-06 17:03:18Z wjx $
 */
package com.someok.base.common;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Base class for Model objects.  This is basically for the toString, equals
 * and hashCode methods.
 *
 * <p><a href="BaseModel.java.html"><i>View Source</i></a></p>
 *
 * @author wjx
 * @version $Revision: 76 $ $Date: 2006-07-07 01:03:18 +0800 (星期五, 07 七月 2006) $
 */
public class BaseModel implements Serializable {
	private static final long serialVersionUID = -3877051702447233446L;

	public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.MULTI_LINE_STYLE);
    }

    public boolean equals(Object o) {
        return EqualsBuilder.reflectionEquals(this, o);
    }

    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }
}
